<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="在途库存查询报表">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="!!btnPermission.export">
                            <div title="导出" yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="零件编号"
                               ng-model="condition.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
                <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix">
                            <label class="control-label">采购单号：</label>
                            <textarea ng-model="condition.billNo" class="form-control" placeholder="逗号分隔或者换行分隔" >
                            </textarea>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">采购凭证号：</label>
                            <textarea ng-model="condition.voucherNo" class="form-control" placeholder="逗号分隔或者换行分隔" >
                            </textarea>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">零件号：</label>
                            <input type="text" ng-model="condition.materialsNo" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">零件中文名：</label>
                            <input type="text" ng-model="condition.materialsDes" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">制单人：</label>
                            <input type="text" ng-model="condition.createName" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">采购组：</label>
                            <input type="text" ng-model="condition.purchaseGroup" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">库区：</label>
                            <input type="text" ng-model="condition.inArea" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">供货商代码：</label>
                            <input type="text" ng-model="condition.supplierSapCode" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">供货商名称：</label>
                            <input type="text" ng-model="condition.supplierOrgName" class="form-control">
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label">开始时间：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.startDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                                   ng-change="checkDate(condition, 'startDate', 'endDate')" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">结束时间：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.endDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                                   ng-change="checkDate(condition, 'startDate', 'endDate')" modal-size="small" readonly>
                        </div>

                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="false"
                 has-check-col="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>